package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        //文件输出流
        FileOutputStream fis = new FileOutputStream("pw.txt",true);
        //转换输出流
        OutputStreamWriter osw = new OutputStreamWriter(fis, StandardCharsets.UTF_8);
        //缓冲字符输出流
        BufferedWriter bw = new BufferedWriter(osw);
        //PrintWriter
        PrintWriter pw = new PrintWriter(bw);
        pw.println("一生有爱何惧风飞沙，悲白发留不住芳华！");
        pw.println("抛去江山如画，换她笑面如花，抵过这一生空牵挂！");
        System.out.println("写出完毕");
        pw.close();
    }
}
